package week02;

import ch4.*;

class Grandparent {
      Grandparent() {
          // parent constructor (java.lang.Object) is always called here
          // or you may call it explicitly with super();
        System.out.println("Grandparent");
     }
}
class Parent extends Grandparent {
   Parent() {
          // parent constructor is always called here
          // or you may call it explicitly with super();
          System.out.println("Parent");
     }
}
class Child extends Parent {
     public static void main(String[] args) {
         Grandparent c = new Grandparent();// invokes the chain of parent constrs.
         System.out.println("Child");
     }
}